﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WinBot
{
    public partial class Form_Options : Form
    {
        public Form_Options()
        {
            InitializeComponent();
            numericUpDown1.Value = Convert.ToDecimal( Settings.MouseMoveTimeout );
            numericUpDown2.Value = Convert.ToDecimal(Settings.MousePressTimeout);
            numericUpDown3.Value = Convert.ToDecimal(Settings.MouseReleaseTimeout);
            numericUpDown4.Value = Convert.ToDecimal(Settings.KeyboardPressTimeout);
            numericUpDown5.Value = Convert.ToDecimal(Settings.KeyboardReleaseTimeout);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Settings.MouseMoveTimeout = Convert.ToDouble(numericUpDown1.Value);
            Settings.MousePressTimeout = Convert.ToDouble(numericUpDown2.Value);
            Settings.MouseReleaseTimeout = Convert.ToDouble(numericUpDown3.Value);
            Settings.KeyboardPressTimeout = Convert.ToDouble(numericUpDown4.Value);
            Settings.KeyboardReleaseTimeout = Convert.ToDouble(numericUpDown5.Value);
            this.Close();
        }
    }
}
